x86/svm: Use physical addresses for HSA and Host VMCB
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 16 Aug 2017 13:31:37 +0000 (13:31 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 17 Aug 2017 11:22:48 +0000 (12:22 +0100)
commitfc0bb10473c19d253e4e30808ee9711a4b9fedae
tree331c6488773a9f79714ea26145c3bc665c33002a
parent2310da993bca1d9101804cbaf2817f38a38b6510
x86/svm: Use physical addresses for HSA and Host VMCB

They are only referenced by physical address (either the HSA MSR, or via
VMSAVE/VMLOAD which take a physical operand).  Allocating xenheap pages and
storing their virtual address is wasteful.

Allocate them with domheap pages instead, taking the opportunity to suitably
NUMA-position them.  This avoids Xen needing to perform a virt to phys
translation on every context switch.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/svm/vmcb.c
xen/include/asm-x86/hvm/svm/vmcb.h